
#include "RtBase.h"
#include "RtAcceptorBase.h"

CRtAcceptorBase::CRtAcceptorBase()
	: m_pThreadNetwork(CRtThreadManager::Instance()->GetThread(CRtThreadManager::TT_NETWORK))
	, m_pReactor(NULL)
	, m_pReactorNetwork(m_pThreadNetwork->GetReactor())
//	, m_ReactorThreadProxy(m_pReactorNetwork, CRtThreadManager::TT_NETWORK)
	, m_pSink(NULL)
{
//	if (CRtThreadManager::IsEqualCurrentThread(m_pThreadNetwork->GetThreadId()))
//		m_pReactor = m_pReactorNetwork;
//	else
//		m_pReactor = &m_ReactorThreadProxy;
	
	RT_ASSERTE(m_pThreadNetwork);
	RT_ASSERTE(CRtThreadManager::IsEqualCurrentThread(m_pThreadNetwork->GetThreadId()));
	m_pReactor = m_pReactorNetwork;

	RT_ASSERTE(m_pReactor);
}

CRtAcceptorBase::~CRtAcceptorBase()
{
}

DWORD CRtAcceptorBase::AddReference()
{
	return CRtReferenceControlSingleThread::AddReference();
}

DWORD CRtAcceptorBase::ReleaseReference()
{
	return CRtReferenceControlSingleThread::ReleaseReference();
}

BOOL CRtAcceptorBase::IsConnector()
{
	return FALSE;
}
